const data = {
  "list": [
    { 
      "id": "1", 
      "productName": "瓜子",
      "productImage": "https://p2.ssl.qhimgs1.com/t011a76d0fbe31feea8.jpg",
      "skuDesc": "香瓜子，茶香瓜子", 
      "price": "558", 
      "unit": "1", 
      "sales": "0",
      "brandId": "1", 
      "categoryId": "shejiyuanze", 
      "status": "1",
      "createTime": "2024-01-01 20:21:12" 
    },
    { 
      "id": "2", 
      "productName": "鞋子",
      "productImage": "https://m.media-amazon.com/images/I/81WEjGPWe3L._AC_UL320_.jpg",
      "skuDesc": "一双鞋子", 
      "price": "9998", 
      "unit": "1", 
      "sales": "12",
      "brandId": "1", 
      "categoryId": "shejiguifan", 
      "status": "2",
      "createTime": "2024-01-01 20:21:12" 
    },
    { 
      "id": "3", 
      "productName": "鸡腿",
      "productImage": "https://p0.ssl.qhimgs1.com/t01c34503951a1c76f6.jpg",
      "skuDesc": "几个小鸡腿几个小鸡腿几个小鸡腿几个小鸡腿几个小鸡腿几个小鸡腿几个小鸡腿", 
      "price": "3280", 
      "unit": "1", 
      "sales": "12",
      "brandId": "1", 
      "categoryId": "shejiguifan", 
      "status": "2",
      "createTime": "2024-01-01 20:21:12" 
    },
    { 
      "id": "4", 
      "productName": "牛奶",
      "productImage": "https://p1.ssl.qhimgs1.com/t01a716815b127c1897.jpg",
      "skuDesc": "牛奶", 
      "price": "1210", 
      "unit": "1", 
      "sales": "12",
      "brandId": "1", 
      "categoryId": "shejiguifan", 
      "status": "2",
      "createTime": "2024-01-01 20:21:12" 
    },
    { 
      "id": "5", 
      "productName": "瓜子",
      "productImage": "https://p2.ssl.qhimgs1.com/t011a76d0fbe31feea8.jpg",
      "skuDesc": "香瓜子，茶香瓜子", 
      "price": "558", 
      "unit": "1", 
      "sales": "0",
      "brandId": "1", 
      "categoryId": "shejiyuanze", 
      "status": "1",
      "createTime": "2024-01-01 20:21:12" 
    },
    { 
      "id": "6", 
      "productName": "鞋子",
      "productImage": "https://m.media-amazon.com/images/I/81WEjGPWe3L._AC_UL320_.jpg",
      "skuDesc": "一双鞋子", 
      "price": "9998", 
      "unit": "1", 
      "sales": "12",
      "brandId": "1", 
      "categoryId": "shejiguifan", 
      "status": "2",
      "createTime": "2024-01-01 20:21:12" 
    },
    { 
      "id": "7", 
      "productName": "鸡腿",
      "productImage": "https://p0.ssl.qhimgs1.com/t01c34503951a1c76f6.jpg",
      "skuDesc": "几个小鸡腿", 
      "price": "3280", 
      "unit": "1", 
      "sales": "12",
      "brandId": "1", 
      "categoryId": "shejiguifan", 
      "status": "2",
      "createTime": "2024-01-01 20:21:12" 
    },
    { 
      "id": "8", 
      "productName": "牛奶",
      "productImage": "https://p1.ssl.qhimgs1.com/t01a716815b127c1897.jpg",
      "skuDesc": "牛奶", 
      "price": "1210", 
      "unit": "1", 
      "sales": "12",
      "brandId": "1", 
      "categoryId": "shejiguifan", 
      "status": "2",
      "createTime": "2024-01-01 20:21:12" 
    },
    { 
      "id": "9", 
      "productName": "瓜子",
      "productImage": "https://p2.ssl.qhimgs1.com/t011a76d0fbe31feea8.jpg",
      "skuDesc": "香瓜子，茶香瓜子", 
      "price": "558", 
      "unit": "1", 
      "sales": "0",
      "brandId": "1", 
      "categoryId": "shejiyuanze", 
      "status": "1",
      "createTime": "2024-01-01 20:21:12" 
    },
    { 
      "id": "10", 
      "productName": "鞋子",
      "productImage": "https://m.media-amazon.com/images/I/81WEjGPWe3L._AC_UL320_.jpg",
      "skuDesc": "一双鞋子", 
      "price": "9998", 
      "unit": "1", 
      "sales": "12",
      "brandId": "1", 
      "categoryId": "shejiguifan", 
      "status": "2",
      "createTime": "2024-01-01 20:21:12" 
    },
    { 
      "id": "11", 
      "productName": "鸡腿",
      "productImage": "https://p0.ssl.qhimgs1.com/t01c34503951a1c76f6.jpg",
      "skuDesc": "几个小鸡腿几个小鸡腿几个小鸡腿几个小鸡腿几个小鸡腿几个小鸡腿", 
      "price": "3280", 
      "unit": "1", 
      "sales": "12",
      "brandId": "1", 
      "categoryId": "shejiguifan", 
      "status": "2",
      "createTime": "2024-01-01 20:21:12" 
    },
    { 
      "id": "12", 
      "productName": "牛奶",
      "productImage": "https://p1.ssl.qhimgs1.com/t01a716815b127c1897.jpg",
      "skuDesc": "牛奶", 
      "price": "1210", 
      "unit": "1", 
      "sales": "12",
      "brandId": "1", 
      "categoryId": "shejiguifan", 
      "status": "2",
      "createTime": "2024-01-01 20:21:12" 
    },
  ],
  "total": 12
}

export function getDate(params) {
  console.log('传递给接口的参数', params)
  // 模拟接口请求返回数据
  return new Promise((resolve) => {
    setTimeout(() => {
      resolve(
        {
          list: data.list.slice((params.pageNo - 1) * params.pageSize, params.pageSize * params.pageNo),
          total: data.total
        }
      )
    }, 1000);
  })
}